<!DOCTYPE html>
<html lang="en">
<head>
    <title>登录</title>
    {% load static %}
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="{% static '/css/layui.css' %}">
    <style type="text/css">

    </style>
</head>
<body>
<fieldset class="layui-elem-field layui-field-title" style="margin-top:10%;padding-left:45%;">
    <legend>Test Platform</legend>
</fieldset>
<div class="center" style="text-align: center; ">
    <h1>　　</h1>
    <h1>　　</h1>


    <form action="" method="post" class="layui-form layui-form-pane">
        {% csrf_token %}
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label" style="margin-left: auto">用户名</label>
                <div class="layui-input-inline">
                    <input type="text" name="username" required lay-verify="required" lay-verType="tips"
                           placeholder="请输入用户名" autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">密码</label>
                <div class="layui-input-inline">
                    <input type="password" name="password" required lay-verify="required" lay-verType="tips"
                           placeholder="请输入密码" autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-show-sm-inline-block">
                <div class="layui-form-mid layui-word-aux">{{error}}</div>
            </div>
        </div>
        <div class="layui-form-item">
            <button class="layui-btn layui-btn-radius" type="submit">登 录</button>
        <!--<a href="{%url 'TestPlatform_User:Register' %}">-->
            <button class="layui-btn layui-btn-radius" type="button" onclick="msg()" style="margin-left: 100px">注 册</button>
        </a>
        </div>
    </form>
</div>
{% load static %}
<script src="{% static '/js/layui.js' %}" charset="utf-8"></script>
<script type="text/javascript">
    function msg() {
        layer.msg('暂未开放该功能！请联系管理员注册账号！', { icon: 4, time: 2000 }, function () {
            // 关闭弹出层
            var index = parent.layer.getFrameIndex(window.name);
            parent.layer.close(index);
        });
    }

</script>
</body>
</html>
